<template>
	<view>
		<view class="video-box" v-if="id===2">
			<video :src="myUrl" controls></video>
		</view>

		<web-view v-if="id===3" :src="myUrl"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: -1,
				myUrl: ""
			};
		},
		onLoad(option) {
			this.id = Number(option.id)
			this.myUrl = option.url
		}
	}
</script>

<style lang="scss">
	.video-box {
		margin: 20rpx 40rpx;

		>video {
			width: 100%;
		}
	}
</style>